Author: Wang Xuan Yi, source: http://www.cnblogs.com/neverdie/Reprinted, Please keep this statement. If you like this article, click [recommendation ]. Thank you!
Introduction
The last time we talked about MonoBehaviour's past and present, we learned that every GameObjec in the game is controlled by a script. This time we started to use Sprite in Native 2D in Unity
2d game, the operation of the wizard needs, is often two points:
1, Static Wizard: General to do background display and so on
2, Sprite Animation: Frame animation, skeletal animation, etc.
Statement: Following the unity of the operation, based on Unity3d 4.3.4, I am a beginn
in ngui. If you want to listen to click events of a button in other objects or scripts, you can use the message transmission method. Ngui encapsulates a message passing class. In the unity navigation bar, choose ngui> interaction> buttonmessage. The principle is to use sendmessage of Unity. If you are interested, you can check it out. Next, let's talk about the topic. The
new C # script and name it spriteoutline. The component will process updates to our materials in the editor and at run time, turn off or turn on contour effects, and change the outline color. You can also use this component in animations to enable or disable the outlines of specific animation frames or to change the outline color.usingUnityengine; [Executeineditmode] Public classSpriteoutline:monobehaviour
-sinAngle * startY; float y = sinAngle * startX + cosAngle * startY; trans. localPosition = new Vector3 (x, y, 0.0f );}}
It is very easy to use.
1. Create a Sprite as a parent;2. Copy the created Sprite. Drag to Step 1 as its sub-object.3. Change the sprite Renderer Color in step 2 to black as the shadow.4. Add an animatio
; creat a Widget. Here's the button style we choose Ngui built-in fantasy style, open folder in Project view
Assets/ngui/examples/atlases/fantasy/As shown in the picture:
Drag fantasy Atlas onto the Widget tool window on Atlas, fantasy font onto font,
Select the template for the button in the template Drop-down box, background is the background style of the buttons, select window.
Add to Penal, Button added successfully, adjust position. The button is renamed "RUN" under the Uilabel component
Unity3d Shaderlab Simulation Sprite AnimationIn the previous article, introduced through the shader simulation of the texture movement , then further, we can also put the frame animation of the sprite texture movement through the shader implementation. Although everyone is in the game script to do a higher level of con
)
Multiple animated segments obtained after cutting the timeline of an imported single animated segment.
Animations created and edited in UnityYou can also create and edit animation segments from the Unity animated interface, which can change the following:
The position, rotation, and proportions of the game object.
Component properties, such as the color of the material, the intensity
currently selected object, and if you ask me what properties you are editing ... I can only say what attributes are edited ... Depending on the script, plugins, and editors written by the program, the editable content is different. The number of times the toilet is used is almost the sum of the other panels.5.Scene scene It's easy for you to drag an object to 1. Hierarchy, this object will be displayed in the scene window. The approximate function is
Use code generation for multi-volume, complex, and regular controllersAnimation Status Code Control1: Each animation state, such as entering the state, leaving the state, etc. may require code to participate in and processing, such as what to do after entering the animation unit, to open the animation unit to do what to do, in order to solve this problem,
Unity's new animation system, called Mecanim, uses animator to replace the old system animation, according to the conventions of the Unity document: The knowledge points are divided into 2 parts: Unity Manual and Unity script, rea
NGUI learning of Unity plug-in (4) -- create UI2DSprite animation and nguiui2dsprite
Create a new Scene and follow NGUI learning of Unity plug-in (2) create UI Root and create a Panel under Camera of UI Root.
In the selected Panel, choose NGUI> Create> Unity 2D Sprite from
;(2) Click on the connection between two States, the right side is a transition effect, you can click Play, the following is a transition condition, the default is no transition conditions, we can add.(3) on the left side of the state machine parameters panel, the parameters can be used to control the condition variables, first to create a parameter, click on the + number, select the int type, called Anim_state, the default value is 0(4) After creating the parameters, then click the line between
Perhaps the content of this article is a bit dull, but I would like to say that if you want to learn more about how the game engine is dealing with animation breaks or footage and the player's manipulated characters to animate, then this is a good article (of course I just translated it)
animated script Animation Scripting
The
using the Megafiers plugin allows unity to support the playback of vertex animations. The official video tutorials are as follows:Here is a simple test using the following environment:
Blender 2.72
Unity 4.5.4
Megafiers 2.74
Create objects and animations first open blender, the default will contain a cube, below the cube to make a simple animation
Unity is always looking for new ways to help developers and provide them with the best tools. Here we announce that unity will be built with the popular skeleton animation plugin anima2d, free for all unity developers since January 2017! Also welcome the plugin author Sergi Valls with this powerful plugin to join our p
1: Create a Sprite Render (player) Animation object and add the script player, click the main Menu "window" →animation (animation window) Animation panel (select the object you want to animate) Click Create
Animation is an animated file in unity, and the main content is composed of key frame data. By adjusting Unity's resource serialization to text, you can view the animation file in text mode.You can set the resource serialization mode by opening the Editor Settings window with the menu item, Project Settings, editor:Shows my a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.